package com.aishau.smartbj.fregment;

import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RadioButton;

import com.aishau.smartbj.R;

/**
 * Created by aishua on 2017/7/27.
 */

public class ContentFregment extends BaseFregment {

    private ViewPager viewpager;
    private RadioButton rb_home;
    private RadioButton rb_news;
    private RadioButton rb_smart;
    private RadioButton rb_gov;
    private RadioButton rb_setting;
    @Override
    public View initView() {

        View view = View.inflate(context, R.layout.fregment_content,null);
        viewpager = (ViewPager) view.findViewById(R.id.viewpager);
        rb_home = (RadioButton) view.findViewById(R.id.rb_home);
        rb_news = (RadioButton) view.findViewById(R.id.rb_news);
        rb_smart = (RadioButton) view.findViewById(R.id.rb_smart);
        rb_gov = (RadioButton) view.findViewById(R.id.rb_gov);
        rb_setting = (RadioButton) view.findViewById(R.id.rb_setting);

        return view;
    }

    @Override
    protected void initDate() {

            viewpager.setAdapter(new MyAdapter());

    }

    public class MyAdapter extends PagerAdapter{


        @Override
        public int getCount() {

            return 0;
        }

        @Override
        public boolean isViewFromObject(View view, Object object) {

            return false;

        }

        @Override
        public Object instantiateItem(ViewGroup container, int position) {

            return super.instantiateItem(container, position);
        }


        @Override
        public void destroyItem(ViewGroup container, int position, Object object) {

            super.destroyItem(container, position, object);
        }
    }
}
